var FileManager = {   
    Current_View: "FileList",
    
    Ajax_Response: ""
};

FileManager.extend =  function(o, p){
    //if(argumnets.length > 1 && (p == null || p == undefined))
    //    return o;
    if (!p) {p = o; o = this;}  
    for (var i in p) o[i] = p[i];  
    return o;
};

// ajax
FileManager.extend ({ 
    ajaxAction: function(params) {
        var url = '../stringRes?s=fileManagerAction';
        $.get(url, params, function(result) {
            //var xmlData = result.responseText;
            var xmlData = result;
            var isRun = false;
            for(var p in FileManager.fn) {
                if(typeof(FileManager.fn[p]) == "function") {
                    if(p == FileManager.Ajax_Response) {
                        isRun = true;
                        FileManager.fn[p](xmlData);
                    }
                }
            }
            if(!isRun) {
                alert(xmlData);
            }
        });
    }
});


